import { getItem, setItem } from '@/utils/auth.js'
const state = {
    token: getItem() || ''
}
const mutations = {
    setToken(state, value) {
        state.token = value
        setItem(value)
    }
}
const actions = {}
const getters = {
    getToken(state) {
        return state.token
    }
}
export default {
    namespaced: true,
    state,
    mutations,
    actions,
    getters
}